<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProductTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('products', function (Blueprint $table) {
            $table->increments('id');
            $table->string('pro_name');
            $table->string('pro_code');
            $table->decimal('pro_prices', 6, 2);
            $table->string('pro_info');
            $table->string('pro_img');
            $table->decimal('spl_prices', 6, 2);
            $table->text('pro_description');
            $table->decimal('promote_price')->default('0.00');
            $table->string('promote_start_time')->nullable();
            $table->string('promote_end_time')->nullable();
            $table->integer('cate_id');
            $table->integer('type_id')->nullable();
            $table->tinyInteger('is_floor')->nullable()->default(0);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('products');
    }
}
